import request from "@/admin/utils/request"

//添加
export function addUser(data) {
    return request({
        url: "/apis/base/user", method: "post", data
    });
}

//列表
export function userList(params) {
    return request({
        url: "/apis/base/user", method: "get", params
    });
}

//删除
export function delUser(id) {
    return request({
        url: `/apis/base/user/${id}`, method: "delete",
    });
}

//更新
export function upDateUser(data, id) {
    return request({
        url: `/apis/base/user/${id}`, method: "put", data
    });
}

// 分配权限
export function setRole(id) {
    return request({
        url: `/apis/base/user/${id}/setRole`, method: "post",
    });
}

// 删除权限
export function delRole(data, id) {
    return request({
        url: `/apis/base/user/${id}/delRole`, method: "post", data
    });
}
